<?php
$partner = db_get_list_post_in_post_type_nopage_metakey(2, 'partner', 'date', 'DESC', $wpdb->prefix.'display', 'display');
query_posts($partner); 
if(have_posts())
{
?>
	<ul>
	<?php
	$image_rs = new  SimpleImage();
	while (have_posts())
	{
		the_post();
		$postID = get_the_ID();
		$title = get_the_title($postID);		
		$perlink = get_permalink($postID);
		$url = get_post_meta($postID,$wpdb->prefix.'url',true);
		if($url)
			$perlink = $url;
		$alt = db_vietnamese_slug($title);
		$thumbnail = db_get_post_meta($postID, $wpdb->prefix.'thumbnail');
		if($thumbnail)
			$thumbnail = db_resizeImage($image_rs, $thumbnail, 71, 60);
		?>
		<li>
           <div class="box-img">
           <img alt="<?php echo $alt;?>" src="<?php echo $thumbnail;?>"/>
            </div>
            <div class="info">
             <a href="<?php echo $perlink;?>" title="<?php echo $title;?>">
                  <?php echo $title;?>
             </a>     
            </div>
         </li>
		<?php 
	}
	wp_reset_query(); 
	unset($image_rs);
	?>
	</ul>
<?php 	
}
else 
{
	echo '<ul><li> No Post!.</li></ul>';
}
?>
